package com.hsy.crm.web.web.stone;

import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.SplitProduct;
import com.hsy.crm.web.domain.vo.splitProduct.SplitProductPageVo;
import com.hsy.crm.web.domain.vo.splitProduct.SplitVo;
import com.hsy.crm.web.service.impl.SplitProductService;
import com.hsy.crm.web.web.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/splitProduct")
public class SplitProductAction extends BaseAction {

    @Autowired
    SplitProductService splitProductService;

    @RequestMapping("/insert")
    public String insert(SplitVo splitVo) {
        return Response.body(splitProductService.insertSplitProduct(splitVo));
    }

    @RequestMapping("/update")
    public String update(SplitVo splitVo) {
        return Response.body(splitProductService.updateSplitProduct(splitVo));
    }

    @RequestMapping("/delete")
    public String delete(SplitProduct splitProduct) {
        return Response.body(splitProductService.deleteSplitProduct(splitProduct));
    }

    @RequestMapping("/page")
    public String page(SplitProductPageVo splitProductPageVo) {
        return Response.body(splitProductService.page(splitProductPageVo));
    }
/*
    @RequestMapping("/examine")
    public String examine(SplitVo splitVo) {
        return Response.body(splitProductService.examine(splitVo));
    }*/

    @RequestMapping("/invalid")
    public String invalid(SplitProduct splitProduct) {
        return Response.body(splitProductService.doInvalid(splitProduct));
    }

    @RequestMapping("/getOrder")
    public String getOrder(SplitProduct splitProduct) {
        return Response.body(splitProductService.getOrder(splitProduct));
    }


}
